<%= link_to_remote truncate("#{documet_type.name}", :length => 10),
      :update => :home_content,
      :url => documents_show_home_url(:documet_name => documet_type.name),
      :method => :get,
      :html => {
      :title => "#{documet_type.name}"
      }
    %>
<p>
  <%= documet_type.articles.length + documet_type.reships.length %>
</p>
<% if loggined_by? documet_type.valleyer %>
  <%= link_to_remote image_tag("valleyer/edit_album.jpg"),
    :update => "home_#{documet_type.id}",
    :url => edit_documents_show_homes_show_documet_type_url(documet_type),
    :method => :get,
    :html => {
    :class => :operate,
    :title => "修改名称"
    }
  %>
  <%= link_to_remote image_tag("valleyer/delete_album.jpg"),
    :update => "home_classfiy",
    :url => documents_show_homes_show_documet_type_url(documet_type),
		:confirm => "确认删除?",
    :method => :delete,
    :loading => "Effect.Fade('home_#{documet_type.id}')",
    :html => {
    :class => :operate,
    :title => "删除"
    } if documet_type.many?
  %>
<% end %>